﻿using System;
using System.IO;

namespace PFB_TextFiles
{
    class Program
    {
        static void Main(string[] args)
        {
            string path1 = "D:\\data.txt";
            string path2 = @"D:\data.txt";
            string myDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            //string text = File.ReadAllText(myDocuments + @"\gitignore_global.txt");
            string text = ReadAllText(myDocuments + @"\gitignore_global.txt");

            Console.WriteLine(text);

            Console.ReadKey();
        }

        static string ReadAllText(string path)
        {
            StreamReader reader = new StreamReader(path);
            string text = reader.ReadToEnd();
            reader.Close();
            return text;
        }
    }
}
